﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Store.Master" Inherits="System.Web.Mvc.ViewPage<YourStore.ViewModels.StoreManagerViewModel>" ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Create
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Create</h2>
     <script src="../../Content/ckeditor/ckeditor.js" type="text/javascript"></script>
    <script src="../../Content/ckeditor/_samples/sample.js" type="text/javascript"></script>
    <link href="../../Content/ckeditor/_samples/sample.css" rel="stylesheet" type="text/css" />
   

    <% Html.EnableClientValidation(); %>

     <% using (Html.BeginForm("Create","StoreManager",FormMethod.Post,new {enctype = "multipart/form-data" }))
       {%>
      <%: Html.ValidationSummary(true) %>
      <%= Html.Hidden("ProductId","0")%>
      <%= Html.Hidden("Deleted",false)%>
      <%= Html.Hidden("CreatedOn",DateTime.Now)%>
      <%= Html.Hidden("UpdatedOn", DateTime.Now)%>
      <div class="create">
        <dl>
        <dt>Category:</dt>
        <dd><%= Html.DropDownList("CategoryId", null, new { style = "width:250px;" })%> </dd>    
        
        <dt> Product Name:</dt>
        <dd> <%= Html.TextBox("Name", null, new { style = "width:250px;" })%> </dd>
        <dt>Product Price:</dt>
        <dd> <%= Html.TextBox("Price", null, new { style = "width:250px;" })%></dd>
        
        <dt>Published:</dt>
        <dd> <%= Html.CheckBox("Published")%> </dd>
        <dt>Product Image:</dt>
        <dd><input type="file" id="Image"  value="Browse"  name="Image" /></dd>
        <dt>Display On Home:</dt>
        <dd> <%= Html.CheckBox("DisplayOnHome")%> </dd>
        <dt>Related Product:</dt>
        <dd> <%= Html.TextBox("RelatedProduct", null, new { style = "width:250px;" })%></dd>
        
        <dt>Product Description:</dt>
        <dd>&nbsp;</dd>
        </dl>   
         
       
        <div style=" float:right"> <%= Html.TextArea("Description", null, new {  @class = "ckeditor",cols="80" ,rows = "10"})%>
        
        <p><input type="submit" value="Save"  class="sub"/></p>
        <p><%: Html.ActionLink("Back to List", "Index") %></p>
        </div>
        </div> 
        

    <% } %>

    

</asp:Content>

